package com.hulk.dryad.manage.framework.websocket.client.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;


/**
 * websocket 客户端集群配置
 *
 * @author
 */
@Getter
@Setter
@Validated
@ConfigurationProperties(WebSocketClientClusterProperties.PREFIX)
public class WebSocketClientClusterProperties {
	public static final String PREFIX = "websocket.client.cluster";

	/**
	 * 是否使用 websocket 集群，默认：true
	 */
	private boolean enabled = true;
	/**
	 * redis sub topic prefix
	 */
	private String redisSubTopicPrefix = "dryad:websocket:cluster:";
	/**
	 * 集群的服务名，必须
	 */
	@NotNull
	private String serverAppName;

}
